
%   This function compiles the cross-forecaster results for KO
%   The cross-forecaster results are reported in the tables in KO


function [res_ivana] = compile_asymmetry_parameters(results1,f)
res = results1(:,:,2);
a1 = [];
a2 = [];
n1 = [];
n2 = [];
J1 = [];
J2 = [];
for i = 1:108
    alfa1 = [];
    alfa2 = [];
    norm1 = [];
    norm2 = [];
    j_test1 = [];
    j_test2 = [];
    if f(i,1) >= 80
        for p = 1:5
            alfa1 = cat(3,alfa1,2 * res(i,p,1).alfa_1 - ones(1,3));
            alfa2 = cat(3,alfa2,2 * res(i,p,1).alfa_2 - ones(1,3));
            norm1 = cat(3,norm1,norm(2 * res(i,p,1).alfa_1 - ones(1,3)));
            norm2 = cat(3,norm2,norm(2 * res(i,p,1).alfa_2 - ones(1,3)));
            j_test1 = [jtest_1 , res(i,p,1).Jtest_1];
            j_test2 = [jtest_2 , res(i,p,1).Jtest_2];
        end,
    end,
    a1 = [a1;alfa1];
    a2 = [a2;alfa2];
    n1 = [n1;norm1];
    n2 = [n2;norm2];
    J1 = [J1;j_test1];
    J2 = [J2;j_test2];
end,
res_ivana.mean_alfa1 = mean(a1,1);
res_ivana.mean_alfa2 = mean(a2,1);
res_ivana.median_alfa1 = median(a1,1);
res_ivana.median_alfa2 = median(a2,1);
res_ivana.mean_norm1 = mean(n1,1);
res_ivana.mean_norm2 = mean(n2,1);
res_ivana.median_norm1 = median(n1,1);
res_ivana.median_norm2 = median(n2,1);

